<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
//前台首页
Route::get('/', function () {
    return view('index');
});

//前台注册
Route::controller('/home/register','LoginController');
Route::get('/home/register','LoginController@register');
Route::post('/home/register','LoginController@doregister');
Route::get('/admin','adminController@index');

//前台注册
// Route::get('/home/login',function(){
// 		return view('home.login');
// });
//测试验证码
Route::get('/home/vcode','LoginController@vcode');

//前台注册js验证&前台登录
Route::controller('/home/resjs','ResjsController');



//邮箱发送
Route::get('/email','LoginController@send');

//后台模块放到同一组中

Route::group(['middleware'=>'login'],function(){

//后台首页
Route::get('/admin','adminController@index');

//后台用户模块
Route::controller('/admin/user','UserController');

//后台类别模块
Route::controller('/admin/cate','CateController');
//后台文章管理
Route::controller('/admin/article','ArticleController');
//后台商品模块
Route::controller('/admin/good','GoodController');

});

//登录路由
Route::controller('/admin/login','LoginController');